﻿@{
}
<section class="app">
    <div class="paging"></div>
</section>
@section footerScript{
    <script type="text/javascript">
        $(function () {
            Topro.UI.DataAutoHeight();

            doSearch();

            $("#btnSearch").click(function () {
                doSearch();
            });
        });

        function Tip_success(word) {
            Topro.UI.Tip_success(word);
        }

        function confirm(obj) {

            var data = {
                id: $(obj).data("id"),
                sign: $(obj).data("sign")
            };

            Topro.Util.Ajax({
                type: "POST",
                url: "/Home/confirm",
                data: data,
                success: function (res) {
                    if (res.success) {
                        Tip_success("操作成功！");
                        doSearch();
                    } else {
                        Topro.UI.Tip_short_warning("操作失败！" + res.errorMessage);
                    }
                },
                error: function (json) {
                    Topro.UI.Tip_warning("操作失败！请查看网络，请重试。");
                }
            });
        }

        function doSearch() {
            Topro.UI.Pager(".paging", { pageSize: 10, ajax: { url: '/Home/InfoQuery?equipmentCode=@(ViewBag.equipmentCode)&staffNum=@(ViewBag.staffNum)&shiftNum=@(ViewBag.shiftNum)' } });
        }
    </script>
}


